using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Floor : MonoBehaviour {
    public GameManger gm;
    public float speed = 4f;
    // Start is called before the first frame update
    void Start() {
        gm = GameObject.FindWithTag("GameManger").GetComponent<GameManger>();
        Destroy(gameObject, 5.0f);
    }

    // Update is called once per frame
    void Update() {
        if (!gm.PlayerDead) {
            transform.Translate(new Vector2(0, speed * Time.deltaTime));
        }
    }

}
